/*
	Copyright (c) 2007, ANYwebcam.com Pty Ltd. All rights reserved.

	The software in this package is published under the terms of the BSD style 
	license, a copy of which has been included with this distribution in the 
	license.txt file.
*/
package com.anywebcam.di.error
{
	/**
	 * Error superclass for errors thrown by the DI library
	 */
	public class DIError extends Error
	{
		private var _cause:Error;
		
		/**
		 * @param message The error message
		 * @param cause The error that triggered this DIError, if any
		 */
		public function DIError( message:String, cause:Error=null )
		{
			super( message );
			_cause = cause;
		}
		
		/**
		 * @return The error that triggered this DIError, if any
		 */
		public function get cause():Error
		{
			return _cause;
		}
	}
}